import numpy as np
from sklearn.cross_validation import train_test_split
from sklearn.svm import SVC

X = np.loadtxt("E:\\github_workplace\\Paper_FlawFinder\\data_example\\train.txt", dtype=np.int)
y = np.loadtxt("E:\\github_workplace\\Paper_FlawFinder\\data_example\\label.txt", dtype=np.int)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=0)
clf = SVC()
clf.fit(X_train, y_train)
SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
    decision_function_shape=None, degree=3, gamma='auto', kernel='rbf',
    max_iter=-1, probability=False, random_state=None, shrinking=True,
    tol=0.001, verbose=False)
# print(clf.predict([[621,66,247,70,86,71,232]]))
print(clf.score(X_test, y_test, sample_weight=None))
